Caption = "This part could have some controls in it..."
Height = 195
Left = 300
TabIndex = 3
Top = 480
Width = 3315
End
End
Begin VB.PictureBox DropBitHider
BorderStyle = 0 'None
Height = 1005
Left = 120
Picture = "DropDown.frx":4067E
ScaleHeight = 1005
ScaleWidth = 4455
TabIndex = 1
Top = 1260
Width = 4455
End
Begin VB.Image TempHolder
Height = 255
Left = 3180
Top = 0
Visible = 0 'False
Width = 255
End
Begin VB.Image CloseHolder
Height = 210
Left = 3660
Picture = "DropDown.frx":4F034
Top = 0
Visible = 0 'False
Width = 240
End
Begin VB.Image MinHolder
Height = 210
Left = 3420
Picture = "DropDown.frx":4F316
Top = 0
Visible = 0 'False
Width = 240
End
Begin VB.Image Min
Height = 210
Left = 3930
Picture = "DropDown.frx":4F5F8
Top = 45
Width = 240
End
Begin VB.Image CloseB
Height = 210
Left = 4200
Picture = "DropDown.frx":4F8DA
Top = 45
Width = 240
End
End
Attribute VB_Name = "Mainwin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'What are all the picture boxes for?
'DropBitHider: Hides the dropping part of the form (controls, pictures, etc.) when not in use
'DropHolder: Contains all the controls and picture for the dropping part of the form
'ControlHolder: Contains normal part controls - so the labels are not hidden by DropBitHider. If not using labels, then you don't need this.
Option Explicit
Private Declare Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const RGN_COPY = 5
Private ResultRegion As Long, WindowRegion As Long
Private Function CreateFormRegion(ScaleX As Single, ScaleY As Single, OffsetX As Integer, OffsetY As Integer) As Long
'This sub created by VBSFC
Dim HolderRegion As Long, ObjectRegion As Long, nRet As Long, Counter As Integer